package de.ret_world.openrpgstudio.engine.scripts;

import de.ret_world.openrpgstudio.editor.script.ScriptObject;
import org.luaj.vm2.LuaTable;
import org.luaj.vm2.LuaValue;

/**
 *
 * @author Emu
 */
public class BackgroundScript implements ScriptObject {

    /**
     * THe Type of the BackgroundScript
     */
    public static enum Type {

        /**
         * Script does not start automatically, but can be called
         */
        Waiting,
        /**
         * Script always runs in the background
         */
        Always,
        /**
         * Script runs in the background in interval mode
         */
        Interval,
        /**
         * Script runs in the background in delayed mode
         */
        Delayed
    }
    
    private String ID;
    private LuaValue script;
    private Type type;

    @Override
    public void create(LuaValue val) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public LuaTable toLua() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String toScript() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String toString() {
        return getID();
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public LuaValue getScript() {
        return script;
    }

    public void setScript(LuaValue script) {
        this.script = script;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }
}
